package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 32338
 * @date 2024-04-12 16:20:43
 * @description
 */
@Mapper
public interface DishFlavorMapper {

    /**
     * @description
     ***:插入多条口味信息
     **/
    void insertBatch(List<DishFlavor> flavors);

    /**
     * @description
     ***:跟局菜品Id删除口味
     **/
    @Delete("delete from dish_flavor where dish_id = #{dishId}")
    void deleteByDishId(Long dishId);

    /**
     * @description
     ***:根据菜品Id来查询口味信息
     **/
    @Select("select * from dish_flavor where dish_id = #{dishId}")
    List<DishFlavor> getFlavorById(Long dishId);
}
